<a role="button" ng-click="editObject()" data-toggle="modal" data-target="#myModal" class="btn btn-primary r" >新建关键字</a>


<div class="fix">
    <table class="table table-striped table-condensed table-bordered table-hover">
        <thead>
        <tr style="background-color: #0081c2; color: #FFFFFF">
            <td ng-repeat="attr in showAttrs" ng-bind="attr.zhCn"></td>
            <td >操作</td>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="model in models">
            <td ng-repeat="attr in showAttrs" ng-bind="model[attr.en]" >
            </td>
            <td><a class="btn btn-default"  role="button"  ng-click="editObject(model)" data-toggle="modal" data-target="#myModal">编辑</a>
                <!--<a class="btn btn-danger"   role="button" data-toggle="modal" data-target="#deleteModal"ng-click="showRemove(model)" role="button" >删除</a>-->
            </td>
        </tr>
        </tbody>

    </table>
</div>




<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button"
                        class="close"
                        data-dismiss="modal"
                        aria-hidden="true">x</button>
                <h3 id="userMgrLabel">编辑关键字</h3>
            </div>
            <div class="modal-body">

                <form name="userForm" class="form-horizontal" novalidate role="form">
                    <div class="form-group" show-errors>
                        <label class="col-sm-2 control-label">关键字</label>
                        <div class="col-sm-10">
                            <input type="text" ng-model="editKey.keyword" name="name" class="form-control" required>
                            <p class="help-block" ng-if="userForm.name.$error.required">必填</p>
                        </div>
                    </div>

                    <div class="form-group" >
                        <label class="col-sm-2 control-label">回复链接</label>
                        <div class="col-sm-10">
                            <div  class="mb2" ng-repeat="reply in editKey.replys track by $index">
                                <input type="text" ng-model="reply.url" name="" style="width: 70%" class="dib form-control">
                                <a class="btn btn-primary btn-xs ml10" ng-click="downReply(reply,editKey.replys)"><span class="glyphicon glyphicon-chevron-up"></span></a>
                                <a class="btn btn-primary btn-xs ml10" ng-click="upReply(reply,editKey.replys)"><span class="glyphicon glyphicon-chevron-down"></span></a>
                                <a ng-click="remove(reply, editKey.replys)">
                                    <i class="remove ml2 cp glyphicon glyphicon-remove-sign glyphicon-white"></i></a>
                            </div>
                            <a class="btn btn-primary btn-xs ml10" ng-click="addReply()"><span class="glyphicon glyphicon-plus"></span></a>
                        </div>
                    </div>




                </form>

            </div>

            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
                <button class="btn btn-primary"
                        ng-click="save(editKey)"
                >保存</button>
            </div>
        </div>
    </div>
</div>



<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button"
                        class="close"
                        data-dismiss="modal"
                        aria-hidden="true">x</button>
                <h3 id="userMgrLabel">删除</h3>
            </div>
            <div class="modal-body">
                <h4>是否删除{{deleteName}}</h4>
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
                <button class="btn btn-primary"
                        data-dismiss="modal"
                        aria-hidden="true"
                        ng-click="remove(deleteObject)"
                >确定</button>
            </div>
        </div>
    </div>
</div>